package no.progark.helikopter;

public enum Direction {
	
	LEFT('l'),RIGHT('r'),UP('u'),DOWN('d');
	
	private char dir;
	
	private Direction(char c){
		dir = c;
	}
	
	public char getDirectionCharacter(){
		return dir;
	}
	
	public Direction getOppositeDirection(){
		Direction result = null;
		switch(this.getDirectionCharacter()){
		case 'u':
			result = DOWN;
			break;
		case 'd':
			result = UP;
			break;
		case 'l':
			result = RIGHT;
			break;
		case 'r':
			result = LEFT;
			break;
		}
		return result;
	}
	
	public static void main(String[] args) {
		Direction d = Direction.DOWN;
		Direction f = d.getOppositeDirection();
	}

}
